import tensorflow._api.v2.compat.v1 as tf

tf.disable_eager_execution()
value = tf.Variable(0)
one = tf.constant(1)
sum = tf.Variable(0)
add_value = tf.add(value, one)
update_value = tf.assign(value, add_value)
add_sum = tf.add(sum, value)
update_sum = tf.assign(sum, add_sum)
with tf.Session() as sees:
    sees.run(tf.global_variables_initializer())
    for i in range(10):
        sees.run(update_value)
        print(sees.run(update_sum))
print('吴棋凡')
